package com.xbongbong.saas.service;

import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.pojo.dto.FormDataListDTO;
import com.xbongbong.paas.pojo.vo.PaasFormDataEsListVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.businessdata.pojo.dto.BusinessDataDTO;
import com.xbongbong.pro.businessproduct.pojo.dto.BusinessProductBatchListDTO;
import com.xbongbong.pro.businessproduct.pojo.dto.BussinessProductBatchAutoMatchDTO;
import com.xbongbong.pro.businessproduct.pojo.vo.BusinessProductBatchListVO;
import com.xbongbong.pro.product.pojo.vo.ProductBatchGetVO;
import com.xbongbong.pro.productstockinfo.pojo.dto.ProductStockInfoDeleteBatchDTO;
import com.xbongbong.pro.productstockinfo.pojo.vo.ProductStockInfoDeleteBatchVO;
import com.xbongbong.saas.domain.entity.ProductStockInfoEntity;

import java.util.List;
import java.util.Map;

/**
 * 产品库存信息接口
 *
 * @author chaoxiong.lei
 * @date 19:07 2019/1/20
 * @since v1.0
 **/
public interface ProductStockInfoService {

    /**
     * 批量删除
     * @param productStockInfoDeleteBatchDTO
     * @return
     * @throws XbbException
     */
    ProductStockInfoDeleteBatchVO deleteBatch(ProductStockInfoDeleteBatchDTO productStockInfoDeleteBatchDTO) throws XbbException;

    /**
     * 获取库存产品信息时要获取审批通过的数据
     *
     * @param corpid 公司id
     * @param extraParam 条件
     * @return 实体
     */
    List<ProductStockInfoEntity> getValidBatchInfoList(String corpid, Map<String, Object> extraParam);


    /**
     * 获取产品批次
     *
     * @param businessProductBatchListDTO
     * @return 产品批次列表
     * @throws XbbException 异常
     * @author 周智
     * 创建时间：2018-1-3 13:56
     */
    List<ProductBatchGetVO> getProductBatchList(BusinessProductBatchListDTO businessProductBatchListDTO) throws XbbException;

    BusinessProductBatchListVO getNewProductBatchList(BusinessProductBatchListDTO businessProductBatchListDTO) throws XbbException;

    /**
     * 获取产品分仓信息
     *
     * @param businessDataDTO
     * @return
     * @throws XbbException
     */
    PaasFormDataEsListVO getProductWarehouse(BusinessDataDTO businessDataDTO) throws XbbException;

    BusinessProductBatchListVO getProductAutoMatchBatch(BussinessProductBatchAutoMatchDTO bussinessProductBatchAutoMatchDTO) throws XbbException;

    /**
     * 批次保质期查询列表
     * @param formDataListDTO 入参
     * @param explainList
     * @return
     */
    PaasFormDataEsListVO guaranteeSearchList(FormDataListDTO formDataListDTO, List<FieldAttrEntity> explainList) throws XbbException;
}
